<!--
<%= link_to "new player", new_player_path %>
-->
<style type="text/css">
.score_div{
	float: left;
	width: 25%;
	text-align: center;
}
</style>

<div>
	<div class="score_div" style="text-align: left;">Player</div>
	<div class="score_div">Total Score</div>
	<div class="score_div">Games Played</div>
	<div class="score_div">Points / Game</div>
</div>

<% cnt = 1 %>
<% @players.each do |player| %>
<div>
	<div class="score_div" style="text-align: left;"><%= link_to "#{player.name}" , player_path(player.id) %></div>
	<div class="score_div"><%=player.score%></div>
	<div class="score_div"><%=player.games_played%></div>
	<div class="score_div"><%=player.games_played > 0 ? Float(Float(player.score) / Float(player.games_played)).round(2) : 0.0 %></div>
</div>

<% end %>
